<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="java.util.*,com.model.*"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<%ArrayList al = (ArrayList)request.getAttribute("list");%>
<body bgcolor="orange">
		<div align="center">购物车的物品如下:</div><hr>
		<table cellpadding="10" cellspacing="10">
		<tr>
		<th>商品编号</th>
		<th>商品种类</th>
		<th>商品描述</th>
		<th>商品价格</th>
		<th>商品数量</th>
		<th>商品总价</th>
		<th>操作</th>
		</tr>
		
		<%
		for(int i = 0; i<al.size(); i++){
			Product p = (Product)al.get(i);
		%>
		
		<tr>
		<td><%=p.getId() %></td>
		<td><%=p.getType() %></td>
		<td><%=p.getDescribe() %></td>
		<td><%=p.getPrice() %></td>
		<td><%=p.getNumber() %></td>
		<td><%=p.getPrice()*p.getNumber() %></td>
		<td>
		<a href="delProduct.jsp?id=<%=p.getId()  %>">删除商品</a>&nbsp;&nbsp;
		<a href="cart.html">继续购物</a>
		</td>
		</tr>
		
		<%} %>
		</table>
</body>
</html>